<?php


namespace app\cms\dto;


use iflow\annotation\value\validate\ValidateRule;
use iflow\Container\implement\annotation\tools\data\NotNull;

class changePassword
{
    #[NotNull(error: '密码不能为空')]
    public string $passWord;
    #[NotNull(error: '请确认密码')]
    public string $confirmPassword;

    #[ValidateRule([
        'code' => 'required',
        'uuid' => 'required',
    ], [
        'code.required' => '验证码不能为空',
        'uuid.required' => '验证识别码不能为空'
    ])]
    public array $sms = [
        'code' => '',
        'uuid' => ''
    ]; // 注册验证码

    #[NotNull(error: '手机号或者邮箱不能为空')]
    public string $account;

    public function getUid() {
        return session('userInfo')['uid'];
    }

}